package com.be.beadmin.device.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.be.beadmin.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;

import javax.persistence.*;

@Entity
@Getter
@Setter
@Table(name="t_de_ehs_info")
public class EhsInfo extends BaseEntity {
    @Column(name = "identification",columnDefinition = "VARCHAR(50) COMMENT '唯一标识'  not null ")
    private String identification;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(value = "yyyy-MM-dd")
    @Column(name = "check_date",columnDefinition = "datetime COMMENT '检查日期' not null")
    private Date checkDate;

    @Column(name = "check_by",columnDefinition = "VARCHAR(20) COMMENT 'EHS专员' not null")
    private String checkBy;

    @Column(name = "check_id",columnDefinition = "VARCHAR(20) COMMENT '检查单号'  not null")
    private String checkId;

    @Column(name = "result",columnDefinition = "VARCHAR(20) COMMENT '整体结果'")
    private String result;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm")
    @Column(name = "handle_time",columnDefinition = "datetime COMMENT '处理时间'")
    private Date handleTime;

    @Column(name = "handle_by",columnDefinition = "VARCHAR(20) COMMENT '处理人员' not null")
    private String handleBy;

    @Column(name = "state",columnDefinition = "VARCHAR(20) COMMENT '问题状态'")
    private String state;
}
